/*
 * @(#)Folder.java
 * Date 2013-04-08
 * Version 1.0
 * Author Jim Horner
 * Copyright (c)2012
 */


package us.hornerscorners.lamppost.model.document;

import java.util.ArrayList;
import java.util.List;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.map.annotate.JsonDeserialize;

import org.codehaus.jackson.map.annotate.JsonSerialize;

import org.joda.time.DateTime;
import us.hornerscorners.lamppost.model.DateTimeJsonDeserializer;

import us.hornerscorners.lamppost.model.DateTimeJsonSerializer;

import us.hornerscorners.lamppost.model.common.AbstractPersistableModel;
import us.hornerscorners.lamppost.model.common.CodedElement;
import us.hornerscorners.lamppost.model.common.InstanceIdentifier;
import us.hornerscorners.lamppost.model.common.PersistableModelType;


/**
 *
 * @author jim
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class Folder extends AbstractPersistableModel implements IAssociable {

    /** Field description */
    private CodedElement availabilityStatus;

    /** Field description */
    private ClassificationNode classificationNode;

    /** Field description */
    private final List<CodedElement> codes;

    /** Field description */
    private final List<Association> submissionSets;

    /** Field description */
    private final List<Attribute> extraAttributes;

    /** Field description */
    @JsonSerialize(using = DateTimeJsonSerializer.class)
    @JsonDeserialize(using = DateTimeJsonDeserializer.class)
    private DateTime lastUpdateTime;

    /** Field description */
    private InstanceIdentifier patientId;

    /** Field description */
    private InstanceIdentifier uniqueId;

    /**
     * Constructs ...
     *
     */
    public Folder() {

        super(PersistableModelType.Folder);

        this.codes = new ArrayList<>();
        this.submissionSets = new ArrayList<>();
        this.extraAttributes = new ArrayList<>();
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public CodedElement getAvailabilityStatus() {

        return availabilityStatus;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public ClassificationNode getClassificationNode() {
        return classificationNode;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public List<CodedElement> getCodes() {

        return codes;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public List<Association> getSubmissionSets() {
        return submissionSets;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public List<Attribute> getExtraAttributes() {
        return extraAttributes;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public DateTime getLastUpdateTime() {
        return lastUpdateTime;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    @Override
    public InstanceIdentifier getPatientId() {

        return patientId;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    @Override
    public InstanceIdentifier getUniqueId() {

        return uniqueId;
    }

    /**
     * Method description
     *
     *
     * @param availabilityStatus
     */
    public void setAvailabilityStatus(CodedElement availabilityStatus) {

        this.availabilityStatus = availabilityStatus;
    }

    /**
     * Method description
     *
     *
     * @param classificationNode
     */
    public void setClassificationNode(ClassificationNode classificationNode) {
        this.classificationNode = classificationNode;
    }

    /**
     * Method description
     *
     *
     * @param lastUpdateTime
     */
    public void setLastUpdateTime(DateTime lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    /**
     * Method description
     *
     *
     * @param patientId
     */
    public void setPatientId(InstanceIdentifier patientId) {

        this.patientId = patientId;
    }

    /**
     * Method description
     *
     *
     * @param uniqueId
     */
    public void setUniqueId(InstanceIdentifier uniqueId) {

        this.uniqueId = uniqueId;
    }
}
